<template>
  <div id="app">
    <nav>
      <!-- 直接使用映射的key获取 -->
      {{ count }}
      <button @click="Changge()">点击</button>
    </nav>
    <router-view/>
  </div>
</template>
<script>

import { mapMutations } from 'vuex'
export default {

  //1.在methods中导入 mapMutations(导入mapState要写在computed中)
  //2.将...mapMutations(['Changge'])写在methods中，给入要导入的方法
  //3.直接函数名调用即可
  

  methods: {
    ...mapMutations(['Changge'])
  }
}

</script>
<style lang="less">

</style>
